package net.chrisrichardson.ec2deployer.core

class EC2ServerHolder {
    private List servers = []

    synchronized List<EC2Server> getServers() {
        java.util.Collections.unmodifiableList(new ArrayList(servers))
    }

    def synchronized addAll(List<EC2Server> newServers) {
        servers.addAll(newServers)
    }

    def synchronized remove(EC2Server server) {
        servers.remove(server)
    }

    def synchronized add(EC2Server server) {
        servers.add(server)
    }

    
}